package com.demo.service.impl;

import com.demo.dao.UserDao;
import com.demo.dao.impl.UserDaoImpl;
import com.demo.factory.UserDaoFactory;
import com.demo.pojo.User;
import com.demo.service.UserService;

public class UserServiceImpl implements UserService {
//    private UserDao dao = new UserDaoImpl();
//    private UserDao dao = UserDaoFactory.getInstance();

    private UserDao userDao;

    public void save(User user) {
        userDao.saveUser(user);
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
}
